1. Field of the Invention
The present invention relates to a program replacement method and device for use in a computer system.
2. Description of the Prior Art
A ROM (Read-Only Memory) in which data can be written only once is in wide practical use today as a program memory for storing main programs. Because normal access to a central processing unit (CPU) cannot rewrite the ROM, the ROM is generally used as an appropriate memory element for storing the main programs which must not be modified or altered.
In recent years, because the quantity of programs is increasing and the contents thereof become complicated, such cases that bugs are discovered in the programs after products have appeared on the market are increasing. In such cases, replacement of the ROM is generally carried out with respect to computer systems in operation on the market in order for the defective programs to be replaced by modified programs with no bugs.
Furthermore, the program replacement is also required to enhance the version of the systems or to enhance system functions at the time an optional appliance or appliances are additionally connected to the systems, as well as to modify the bugs. The replacement of the ROM is also carried out for this purpose.
However, the replacement of the ROM requires, when carried out with respect to computer systems in operation on the market, much time and labor. In view of this fact, Japanese Laid-open Patent Publication No. 58-199388 discloses a ROM cassette in which a ROM is incorporated and which is removably mounted in a computer system. When replacement of programs is required, the ROM cassette is replaced by another. In this instance, the ROM cassette is designed as a replaceable type and is adapted to be connected to the CPU through, for example, a connector.
This method, however, has a problem in that the simpler the replaceable design is made, the more susceptible the ROM cassette is to external disturbance such as, for example, noises or static electricity. Hence, the system as a whole will be apt to result in an erroneous operation.
To overcome this problem, the use of a random access memory element (RAM) in which programs can be written and read has been proposed. According to this method, the system control is normally carried out by reading programs from the RAM. When replacement of the programs is required, an external memory element having programs by which the programs stored in the RAM are desired to be replaced is connected to the system, and the programs stored in the external memory element are transferred to the RAM.
This method, however, has a problem in reliability in program storage, which is primarily caused by the property of the RAM. The reason for this is discussed hereinbelow.
The RAM generally has a write enable terminal (WE terminal) to distinguish between the reading and writing of data. The WE terminal allows, only when a signal directed thereto is enabled, data to be written in the RAM, and at the same time, functions to prevent the contents of the RAM from being unexpectedly rewritten.
Furthermore, the RAM generally has a chip selection terminal (CS terminal) in addition to the WE terminal. Unless two signals directed to these terminals are both enabled, the data i.e., rewriting the programs stored in the RAM is not allowed. Because a circuit is so designed as to disable, when no signal is outputted from the CPU, both of the terminals, there is little chance to enable the two terminals at the same time even in the presence of noises or the like, and hence, it is unlikely that the data in the RAM would be unexpectedly rewritten.
However, if the CPU is shut down by any reason, the data in the RAM may be rewritten by an error signal from the CPU. Accordingly, a problem is encountered in reliability in the case where the RAM is used for storage of the main programs by the normal connection method.
One of methods to overcome this kind of problem is the provision of a dip switch interposed between the WE terminal of the RAM and a write signal outputted from the CPU. In this case, only when the dip switch is turned on, the write signal from the CPU is transmitted to the RAM.
The dip switch is, however, a change-over switch of the type wherein, even if the operation force is removed, the ON/OFF state immediately before the removal of the operation force is held. Accordingly, the rewriting of the RAM depends upon not the circuit itself but the operation of an operator.
More specifically, if the operator has forgotten changing over the switch, a write signal output terminal of the CPU and the WE terminal of the RAM are left connected, and in this case, the provision of the switch may make no sense. In addition, it is likely that the operator leaves the system with the switch ON.
Accordingly, in applications where the dip switch is employed, the reliability of the system depends upon the reliability in operation i.e., whether or not the operator turns off the dip switch. Although the provision of the dip switch is helpful to call an operator's attention in rewriting the programs, it cannot be expected that storing the programs in the RAM would enhance the reliability of the system.